﻿
@model IEnumerable<Student>
@{
    ViewBag.Title = "首页 学生列表";
}

<div class="card-deck">
    @foreach(var student in Model)
    {
        var photoPaht = "~/Images/" + (student.PhotoPath??"vsimg03.jpg");
        <div class="card m-3">
                <div class="card-header">
                    <h3>@student.Name</h3>
                </div>
                <img class"card-img-top imagesThumbnail" src="@photoPaht" asp-append-version="true"/>
                <div class="card-footer text-center">
                    <a class="btn btn-primary m-1" asp-controller="Home" asp-action="Details" asp-route-id="@student.Id" >查看</a>
                    <a asp-controller="home" asp-action="edit"  asp-route-id="@student.Id"  class="btn btn-primary m-1">编辑</a>
                    <a href="#" class="btn btn-danger m-1">删除</a>
                </div>
        </div>
    }
</div>

